﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LIMS.BLL
{
    public class ProjectManager
    {
        private static LIMS.IDAL.IProject project = DALFactory.DataAccess<LIMS.IDAL.IProject>.CreateObject();
       
        public static Boolean AddProject(LIMS.Model.Projects pro)
        {
            return project.Add(pro);
        }

        public static Boolean DeleteProject(LIMS.Model.Projects pro)
        {
            return project.Remove(pro);
        }

        public static Boolean UpdateProject(LIMS.Model.Projects pro)
        {
            return project.Moeify(pro);
        }

        public static List<LIMS.Model.Projects> SearchProject(String strProName)
        {
            if (!String.IsNullOrEmpty(strProName))
            {
                return project.FindByProName(strProName);
            }
            return project.FindAll();
        }

        public static LIMS.Model.Projects SearchProjectByID(Int32 ID)
        {
            return project.FindByID(ID);
        }

    }
}
